const a = async function (
  _,
  { $grid },
  _01,
  { dc: { http, message, Confirm } }
) {
  const ret = await new Promise((resolve) => {
    Confirm({
      iconType: "info",
      title: "同步数据",
      content:
        "该操作将清空预算管理和预算执行数据,并同步最新数据,时间预计0.5-2小时左右,是否继续?",
      onOk: async () => resolve(true),
      onCancle: async () => resolve(false),
    });
  });
  if (!ret) return;
  const { code, msg } = await http.post(
    { url: "/nyk/search/refreshData", data: {} },
    { isTransformResponse: false }
  );
  if (code === 200) {
    message.info("开始同步数据,请等待");
  } else {
    message.error(msg);
  }
  $grid.commitProxy("query");
};
